﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class mesas_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Administrador user = (Administrador)this.Session["Administrador"];
        if (user == null)
        {
            Response.Redirect("../noEstaLogeado.aspx", true);
        }
        ArrayList l = GestionMesas.getInstance().getMesas();
        if (l.Count == 0)
        {
            GestionMesas.getInstance().cargarMesas();
            l = GestionMesas.getInstance().getMesas();
            Label1.Text = "Se han cargado " + l.Count + " mesas";
        }
        else
        {
            Label1.Text = "Ya existen mesas en memoria, no se carga ninguna";
        }
    }
}
